import Layout from "../layout/index.vue";

export default [
  {
    path: "/redirect",
    component: Layout,
    hideMenu: true,
    children: [
      {
        path: ":path(.*)",
        component: () => import("../views/redirect/index.vue"),
        meta: { title: "重定向", hideMenu: true },
      },
    ],
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("../views/Login.vue"),
    hideMenu: true,
    meta: { title: "登录" },
  },
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    hideMenu: true,
    children: [
      {
        path: "dashboard",
        icon: "DashboardOutlined",
        name: "Dashboard",
        component: () => import("../views/dashboard/index.vue"),
        meta: {
          title: "仪表盘",
          affix: true,
          keepAlive: true,
        },
      },
    ],
  },
  {
    path: "/data",
    component: Layout,
    name: "Data",
    icon: "AndroidOutlined",
    label: "字典维护",
    children: [],
  },{
    path: "/data-other",
    component: Layout,
    name: "DataOther",
    icon: "UnorderedListOutlined",
    label: "数据维护",
    children: [
      {
        path: "article",
        key: "/data-other/article",
        name: "Article",
        label: "文章管理",
        component: () => import("../views/data/article/index.vue"),
        meta: {
          title: "文章管理",
          keepAlive: true,
        },
      },
      {
        path: "ads",
        key: "/data-other/ads",
        name: "Ads",
        label: "广告管理",
        component: () => import("@/views/data/ads/index.vue"),
        meta: {
          title: "广告管理",
          keepAlive: true,
          icon: "PictureOutlined",
        },
      },
      {
        path: "help_questions",
        key: "/data-other/help_questions",
        name: "Help_questions",
        label: "帮助中心",
        component: () =>
            import("../views/data/help_questions/index.vue"),
        meta: {
          title: "帮助中心",
          keepAlive: true,
        },
      },
      {
        path: "position",
        key: "/data-other/position",
        name: "Position",
        label: "岗位管理",
        component: () => import("../views/data/position/index.vue"),
        meta: {
          title: "岗位管理",
          keepAlive: true,
        },
      },
    ],
  },
  {
    path: "/system",
    component: Layout,
    name: "System",
    redirect: "/system/notice",
    icon: "SettingOutlined",
    label: "系统管理",
    children: [
      {
        path: "user",
        key: "/system/user",
        name: "User",
        label: "用户管理",
        component: () => import("../views/system/user/index.vue"),
        meta: {
          title: "用户管理",
          keepAlive: true,
        },
      },
      {
        path: "dict",
        key: "/system/dict",
        name: "Dict",
        label: "字典管理",
        component: () => import("../views/system/dict/index.vue"),
        meta: {
          title: "字典管理",
          keepAlive: true,
        },
      },
      {
        path: "notice",
        key: "/system/notice",
        name: "Notice",
        label: "公告管理",
        component: () => import("../views/system/notice/index.vue"),
        meta: {
          title: "公告管理",
          keepAlive: true,
        },
      },
    ],
  },
  {
    path: "/profile",
    component: Layout,
    hideMenu: true,
    children: [
      {
        path: "",
        name: "Profile",
        component: () => import("@/views/profile/index.vue"),
        meta: {
          title: "个人中心",
          hideMenu: true,
        },
      },
    ],
  },
];
